var that;
var app=getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    state:""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    that = this
    that.state=app.globalData.state[options.stateIndex]
    that.setData({
      state:that.state
    })
  },
  chatbegin:function(options){
    var openid2 = options.currentTarget.dataset.all.openid
    var avatarUrl2 = options.currentTarget.dataset.all.userInfo.avatarUrl
    var nickName2 = options.currentTarget.dataset.all.userInfo.nickName
    wx.navigateTo({
      url: '../room/room?openid2='+ openid2+'&avatarUrl2='+ avatarUrl2+'&nickName2='+nickName2
    })
  }
})